import math


class Circle:
    # 必须传递半径
    def __init__(self, name, radius):
        self.radius = radius
        self.name = name

    # 面积
    def area(self):
        return self.radius * self.radius * math.pi

    # 周长
    def perimeter(self):
        return 2 * self.radius * math.pi


if __name__ == "__main__":
    circle = Circle("圆1", 3)
    print(circle.name)
    print(circle.radius)
    print(circle.area())
    print(circle.perimeter())
